#pragma once
#define _CRT_SECURE_NO_WARNINGS 1

#include<stdio.h>
#include<stdlib.h>
#include<time.h>

#define ROW 9
#define COL 9
#define ROWS ROW+2
#define COLS COL+2
#define MINE 10		//地雷

void menu();
void menu2();
void game();
void init_Mine(char mine[ROWS][COLS], int rows, int cols);
void init_Show(char show[ROWS][COLS], int rows, int cols);
void print_Show(char show[ROWS][COLS], int row, int col);
void set_mine(char mine[ROWS][COLS], int row, int col);
int find_Mine(char mine[ROWS][COLS], char show[ROWS][COLS], int row, int col);
int get_count(char mine[ROWS][COLS], int x, int y);
int Boom_board(char show[ROWS][COLS], char mine[ROWS][COLS], int x, int y);
int Browse_show(char show[ROWS][COLS], int row, int col);
int Flag(char show[ROWS][COLS], int row, int col);
int Cancel_flag(char show[ROWS][COLS], int row, int col);